class Player(object):
    def __init__(self, health, image):
        self.x = 0
        self.y = 0
        self.image = image
        self.health = health
        self.maxhealth = health
        self.alive = True

    def attack(self, power):
        self.health -= power
        if self.health <= 0:
            self.health = 0
            self.alive = False
